package services.expertInfo;

import base.IBaseServices;
import wt.entity.dictionary.MajorType;
import wt.entity.expertInfo.ExpertMajor;
import wt.entity.expertInfo.ExpertMajorExample;

import java.util.List;

/**
 * Created by Administrator on 2017/10/14.
 */
public interface ExpertMajorServices extends IBaseServices<ExpertMajor, ExpertMajor, ExpertMajorExample> {


    /**
     * 专家更新自己专业
     *
     * @param insertMajorTypeIdList
     * @param deleteMajorTypeIdList
     * @throws Exception
     */
    int expertUpdateMajor(List<String> insertMajorTypeIdList, List<String> deleteMajorTypeIdList,String expertId) throws Exception;


    /**
     * 专家获取专业
     * @param expertId
     * @return
     * @throws Exception
     */
    List<ExpertMajor> expertSelectByExpertId(String expertId) throws Exception;







    /**
     * 根据专业编号获取拥有改专业的专家。
     * 专家只要满足一个专业即可。
     * @param majorNumList
     * @return
     * @throws Exception
     */
    List<ExpertMajor> adminSelectByMajorNumList(List<String> majorNumList) throws Exception;


    /**
     * 根据专业Id获取拥有改专业的专家。
     * 专家只要满足一个专业即可。
     * @param majorIdList
     * @return
     * @throws Exception
     */
    List<ExpertMajor> adminSelectByMajorIdList(List<String> majorIdList) throws Exception;

    /**
     * 管理员修改专家从事专业
     *
     * @param  insertMajorTypeIdList
     * @param  deleteMajorTypeIdList
     * @throws Exception
     */
    int adminUpdateMajor(List<String> insertMajorTypeIdList, List<String> deleteMajorTypeIdList,String expertId  ) throws Exception;

    /**
     * 管理员获取专家从事专业 用于查看
     * @param expertId
     * @return
     * @throws Exception
     */
    List<MajorType> adminSelectForShow(String expertId) throws Exception ;


    /**
     * 管理员获取专家勾选的节点（叶子节点）id
     * @param expertId
     * @return
     * @throws Exception
     */
    List<String> adminSelectCheckedLeafIds(String expertId) throws Exception ;




    /**
     * 检测专家是否有专业还未审核
     * @param expertId
     * @return
     * @throws Exception
     */
    boolean isExistUnauditedRecord(String expertId) throws Exception;

    /**
     * 清除还未被审核通过的记录
     * @param expertId
     */
    int  clearUnauditedRecord(String expertId)throws Exception;

    /**
     * 管理员核查专家信息
     * @return
     * @throws Exception
     */
    void adminCheckApplyByPrimaryKey(String expertId, boolean result, String reason) throws Exception;


}
